package org.git.movie.controller;

import org.git.movie.annotations.Verify;
import org.git.movie.service.IRiskConfigService;
import org.git.movie.util.BaseController;
import org.git.movie.util.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sqyc
 */
@RestController
@RequestMapping("/riskconfig")
public class RiskConfigController  extends BaseController {

    @Autowired
    private IRiskConfigService riskConfigService;

    @ResponseBody
    @RequestMapping(value = "/getbykey.do", method = {RequestMethod.POST,RequestMethod.GET})
    public BaseResponse<String> getbykey(  @Verify(param="key",rule="required") String key) {


        String result = riskConfigService.getbykey(key);
        return   ok(result);
    }
}
